<div ng-init="dvm.init()">
  <div class="modal-header">
    <button type="button" class="close" ng-click="dvm.close()">&times;</button>
    <h4 class="modal-title">文件【{{dvm.file}}】历史</h4>
  </div>
  <div class="modal-body" style="max-height:600px;overflow-y:auto">
    <table class="table table-bordered table-responsive">
      <thead>
        <tr>
          <th width="4%" class="text-center">
            <input type="checkbox" ng-model="dvm.selectAll" ng-change="dvm.select()">
          </th>
          <th width="50%">&lt;SHA&gt;MESSAGE</th>
          <th width="8%">STATUS</th>
          <th width="18%">DATE</th>
          <th width="20%">COMMITTER</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="commit in dvm.commits">
          <td align="center"><input type="checkbox" ng-model="commit.checked"></td>
          <td><a href="javascript:void(0)" ng-click="dvm.show(commit)"
              title="{{commit.message}}">&lt;{{commit.sha}}&gt;<br>{{commit.message}}</a></td>
          <td align="center" ng-switch="commit.status">
            <font color="green" title="ADDED" ng-switch-when="1">A</font>
            <font color="red" title="DELETED" ng-switch-when="2">D</font>
            <font color="blue" title="MODIFIED" ng-switch-when="3">M</font>
            <font color="black" ng-switch-default>{{commit.status}}</font>
          </td>
          <td align="center">{{commit.date | date: 'yyyy/MM/dd HH:mm:ss'}}</td>
          <td>{{commit.email}}</td>
        </tr>
      </tbody>
    </table>
    <button class="btn btn-default btn-block" ng-if="!dvm.ending" ng-click="dvm.load()">加载更多...</button>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-default" ng-click="dvm.diff()" ng-disabled="!dvm.diffEnabled">
      <i class="fa fa-binoculars"></i> 比较</button>
    <button type="button" class="btn btn-default" ng-click="dvm.revert()" ng-disabled="!dvm.revertEnabled">
      <i class="fa fa-reply"></i> 回退</button>
    <button type="button" class="btn btn-default" ng-click="dvm.close()">
      <i class="fa fa-times"></i> 关闭</button>
  </div>
</div>
